<?php

$_REQUEST['subsite'] = 'backend';
require ('core/shop.php');

 if ($G_PGLOB->isUserLogon) {

     $nav_name = $G_PGLOB->get_cookie_info('nav_name');
     if (!$nav_name) {
         $nav_name = 'b2c';
         $G_PGLOB->set_cookie_info('nav_name', $nav_name, 8640000);
     }
     $G_PGLOB->smarty->assign('nav_name', $nav_name);
     
     $userName = $G_PGLOB->currentUserName;
     $G_PGLOB->smarty->assign('userName', $userName);

	 $G_PGLOB->smarty->assign('company_short_name', COMPANY_SHORT_NAME);
     $G_PGLOB->smarty->display('comm/main.tpl');
     die;

 }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo COMPANY_SHORT_NAME?></title>
<style type="text/css">
    body{margin:0;padding:0;}img{vertical-align:middle;}body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}.x-box-tl{zoom:1;}.x-box-tr{color:#3c3e43;margin-bottom:20px;height:58px;position:relative;}.x-box-h3{background:#0066cc;width:525px;height:50px;line-height:50px;margin:0;padding:0;}.x-box-mr{ box-shadow: 5px 5px 5px #ccc; -moz-box-shadow: 5px 5px 5px #ccc; -webkit-box-shadow: 5px 5px 5px #ccc;}.x-box-mc{position:relative;padding-top:4px;font-family:"Myriad Pro","MyriadWeb","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:12px; -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background:#fff;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ;');
    }.x-box-mc h3{font-size:14px;font-weight:bold;margin:0 0 4px 0;zoom:1;}.x-box-tl{overflow:hidden;}.input_description{margin-left:7px;color:rgb(153,153,153);}.earth_bg{background:url(/quanliadmin/docroot/images/backend/earth.png) no-repeat;width:277px;height:310px;position:absolute;left:-115px;top:35px;}.earth_r{background:url(/quanliadmin/docroot/images/backend/earth_r.png) no-repeat;width:410px;height:40px;position:absolute;left:85px;bottom:-40px;}.input_name{padding-right:3px;color:rgb(51,51,51);font-size:15px;}.login_btn{width:90px;border:0px;font-family:'微软雅黑';font-size:16px;font-weight:500;height:44px;width:94px;height:40px;background:#0066cc;cursor:pointer;border-radius:3px;border-bottom:1px solid #444444;color:#fff;#border-bottom:0 none;}.loginPanel{margin:100px auto;height:400px;width:525px;padding-left:120px;}.x-form-text{height:16px;line-height:16px;vertical-align:middle;}.x-form-text,textarea.x-form-field{border:1px solid #979797;padding:1px 1px;height:30px;line-height:30px;width:250px;  font-size:16px;}.x-form-text:focus{border-color:#6784c7;outline: medium none;}tr td{padding-bottom:7px;}.foot{font-family:"Myriad Pro","MyriadWeb","Tahoma","Helvetica","Arial",sans-serif;color:#aaaaaa;font-size:12px;text-align:center;padding-top:33px;}
</style>

</head>
<body style="background:#dbdbdb;width:100%;height:auto;">

<form id="formLogin" name="formLogin" method="post" action="/quanliadmin/app/login/login.pscript?operFlg=1">
<div class="loginPanel">
		<div class="x-box-tl">
			<div class="x-box-tr">
				<span  style="position:absolute;top:5px;left:0;"></span>
				<span style="font-weight:bold;font-family:'微软雅黑'; color:#0066cc;font-size:36px;padding-left:20px;"><?php echo COMPANY_SHORT_NAME?>管理平台</span>
			</div>
		</div>
		<div class="x-box-ml">
			<div class="x-box-mr">
				<h3 class="x-box-h3">
					<span style="color:#fff;margin-left:27px;"><em style="font-family:'微软雅黑';font-weight:bold;font-size:18px;">用户登录</em><em style="color:#fff;font-family:'Arial';font-size:18px;">&nbsp;/&nbsp;Login in</em></span>
				</h3>
				<div align="center" class="x-box-mc" style="height:240px;">
					<table id="j_id2:j_id5" cellspacing="3px" style="width:400px;margin-left:120px;">
					<tr>
						<td colspan="1">
							&nbsp;
						  </td>
						  <td colspan="2">	
							<div id="error_msg" align="left" style="height:12px;color:red;">
                                <?php
                                if (isset($_REQUEST["err_msg"])){
                                    echo $_REQUEST["err_msg"];
                                } else {
                                    echo '&nbsp;';
                                }
                                ?>
							</div>
						  </td>							  			
					</tr>
						<tr>
							<td align="right" colspan="1" rowspan="1" class="input_name">
								用户名：
							</td>
							<td align="left"  colspan="2">
                                <input class="x-form-text" id="userID" name="userID" type="text" maxlength="15" size="25"  style="ime-mode:active;" value="">
                                <span class="input_description" style="display:none;">4-20位字符,中英文</span>
							</td>
						</tr>

						<tr>
							<td align="right" colspan="1" rowspan="1" class="input_name">
								密&nbsp;&nbsp;&nbsp;码：
							</td>
							<td align="left" colspan="2">
								<input class="x-form-text" id='userPwd' name='userPwd' type='password' maxlength="15" size="25" style="ime-mode:Disabled">
								<span class="input_description" style="display:none;">6-16位字符</span>
								</td> 
							</td>
						</tr>
						<tr>
							<td align="right" class="input_name">
								验证码：
							</td>
							<td align="left" colspan="2">
								<div style="float:left"><input id="yzm" name="yzm" type="text" maxlength="4" size="10" class="x-form-text"
                                                               style="width:150px;ime-mode:disabled" autocomplete="off"/>&nbsp;</div>
								<div id="yzmDiv" name="yzmDiv" style="float:left;margin-left:10px;margin-top:9px;"></div>
							</td>
						</tr>

						<tr>
							<td></td>
							<td align="center" colspan="2" height="50px" style="text-align:left;">
								

								<input type="submit" value="登录" class="login_btn" style="width: 150px;" onclick="submit();">

                                <input type="reset" value="取消" class="login_btn" style="margin-left:15px;width: 75px;"  >
							</td>
						</tr>
					</table>

					<div class="earth_bg"></div>
				</div>
			</div>
		</div>

		<div class="foot"><?php echo COMPANY_NAME?> Copy Rights 2010-2020 </div>
	</div>
</form>

<script language="JavaScript" src="/framework/jquery/jquery.min.js" type="text/javascript"></script>
<script language="JavaScript" src="/framework/ebsig/js/ebsig.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#userID").focus();
        $.ajax({
        	type: "POST",
            url: "/invokingAjax-backend/login/login.ajax?operFlg=1"
            });
        });
    var user={check:function(){var dt=E.getFormValues("formLogin");if(dt.userID==""){$("#error_msg").text("用户名不能为空");$("#userID").focus();return false}if(dt.userPwd==""){$("#error_msg").text("密码不能为空");$("#userPwd").focus();return false}if(dt.yzm==""){$("#error_msg").text("验证码不能为空");$("#yzm").focus();return false}return true},createYzm:function(){var yzm_src="/core/yzm.html?code="+Math.ceil(Math.random()*10000);var yzm_html="<img id='yzm_img' name='yzm_img' height='26px' width='75px;' style='cursor:pointer;' title='验证码' onclick='user.createYzm();' src='"+yzm_src+"' />";$("#yzmDiv").html(yzm_html)}};
    user.createYzm();
</script>

</body>
</html>